$theme:      'default';
$text:       #343A40;
$subtext:    #707070;
$offtext:    #B0B0B0;
$modesttext: #969696;
$line:       #6C757D;
$offline:    #DDDDDD;
$activeline: #DC3545;
$background: #FFFFFF;
$invertbg:   #121212;
$striped1:   #F7F7F7;
$striped2:   #F0F0F0;
$active:     #F73333;
$marker:     #2C7CFF;
/*!
 * jQuery Timeline Plugin
 * ------------------------
 * Version: 2.1.2
 * Coded by: ka2 ( https://ka2.org/ )
 * Repository: https://github.com/ka215/jquery.timeline
 * Lisenced: MIT
 */
@charset "UTF-8";
/* ----------------------------------------------------------------------------
 * Common style
 * ----------------------------------------------------------------------------
 */
.timeline-events {
  display: none;
  visibility: hidden;
  position: asolute;
  left: -9999px;
  top: -9999px;
  width: 0;
  height: 0;
  opacity: 0;
  z-index: -9999;
}

.jqtl-hide {
  display: none;
  visibility: hidden;
  opacity: 0;
}

.jqtl-align-self-left {
  clear: both;
  float: left;
  display: inline-block;
  text-align: left;
  align-self: left;
}

.jqtl-align-self-right {
  clear: both;
  float: right;
  display: inline-block;
  text-align: right;
  align-self: right;
}

.jqtl-align-self-center {
  clear: both;
  display: inline-block;
  text-align: center;
  align-self: center;
}

/* ----------------------------------------------------------------------------
 * Headline style
 * ----------------------------------------------------------------------------
 */
.jqtl-headline {
  width: auto;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  padding-left: 5px;
  padding-right: 5px;
}

.jqtl-headline-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: stretch;
}

.jqtl-timeline-title {
  align-self: center;
  font-size: 26px;
  color: $text;
}

.jqtl-range-meta {
  align-self: center;
  font-size: 86%;
  color: $subtext;
}

.jqtl-range-span {
  position: relative;
  display: inline-block;
  margin-left: calc(1em / 4);
  margin-right: calc(1em / 4);
  width: 1em;
  height: 1em;

  &::before {
    content: "\2013";
    position: absolute;
    left: 20%;
    top: calc(50% - 0.5rem);
    font-size: 1rem;
    color: $offtext;
  }
}

/* ----------------------------------------------------------------------------
 * Body container style
 * ----------------------------------------------------------------------------
 */
.jqtl-container {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  border: solid 1px $offline;
  overflow-x: auto;
  overflow-y: hidden;
  background-color: $background;
  box-sizing: content-box;
  
  *,
  ::after,
  ::before {
    box-sizing: inherit !important;
  }
}

.jqtl-hide-scrollbar {
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

.jqtl-hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.jqtl-main {
  position: relative;
  cursor: ew-resize; /* all-scroll; move; */
}

/* ----------------------------------------------------------------------------
 * Ruler style
 * ----------------------------------------------------------------------------
 */
.jqtl-ruler-top,
.jqtl-ruler-bottom {
  position: relative;
  outline: solid 1px $offline;
  overflow: hidden;
  z-index: 20;
}

.jqtl-ruler-bg-top,
.jqtl-ruler-bg-bottom {
  position: relative;
  z-index: 21;
}

.jqtl-ruler-top {
  bottom: 0;
}

.jqtl-ruler-bottom {
  top: 0;
}

.jqtl-ruler-content-top,
.jqtl-ruler-content-bottom {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  z-index: 22;
}

.jqtl-ruler-line-rows {
  position: relative;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;

  &:nth-child(even) {
    background-color: rgba($striped1, 0.25);
  }
}

.jqtl-ruler-line-item {
  position: relative;
  margin: 0;
  padding: 0;
  min-width: 0;
  text-align: center;
  align-self: center;
  font-family: "Courier New", monospace !important;
  color: $subtext;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 0;
  outline: 0;

  span {
    display: inline-block;
  }
}

.jqtl-rli-left {
  text-align: left;
  align-self: left !important;
}

.jqtl-ruler-line-item:nth-child(even) {
  background-color: rgba($striped2, 0.25);
}

/* ----------------------------------------------------------------------------
 * Event container style
 * ----------------------------------------------------------------------------
 */
.jqtl-event-container {
  position: relative;
  outline: solid 1px $offline;
  z-index: 1;
}

.jqtl-bg-grid {
  position: relative;
  z-index: 2;
}

.jqtl-relation-lines,
.jqtl-events {
  position: absolute;
  display: block;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transition: all 0.3s;
}

.jqtl-relation-lines {
  visibility: hidden;
  opacity: 0;
  z-index: 3;

  &[data-state="shown"] {
    visibility: visible;
    opacity: 1;
  }
}

.jqtl-events {
  overflow-x: hidden;
  visibility: hidden;
  opacity: 0;
  z-index: 4;

  &[data-state="shown"] {
    visibility: visible;
    opacity: 1;
  }
}

/* ----------------------------------------------------------------------------
 * One event style
 * ----------------------------------------------------------------------------
 */
.jqtl-event-node { /* bar type */
  position: absolute;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  align-content: center;
  padding-left: 0;
  padding-right: 0;
  border-radius: 2px;
  overflow: hidden;
  visibility: visible;
  opacity: 1;
  z-index: 7;
  cursor: pointer;
  transition: all 0.3s ease;

  &:not(.jqtl-event-type-pointer) {
    &.active {
      color: $background;
      background-color: $active;
    }
  }
}

.jqtl-event-label,
.jqtl-event-node > * {
  /*flex-grow: 1;*/
  align-self: center;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding-left: 0.5em;
  padding-right: 0.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 1rem; /* Defaults to 16px */
}

.jqtl-event-thumbnail {
  margin-right: 4px;
  border-radius: 3px;
  transition: all 0.5s ease;
}

.jqtl-event-node {
  &:hover {
    color: $background;
    background-color: $active;

    &::after {
      z-index: 6;
      background-color: rgba($invertbg, 0.1);
    }

    .jqtl-event-thumbnail {
      opacity: 0.75;
    }
  }

  &::before {
    content: attr(data-meta);
    position: absolute;
    right: 4px;
    top: 2px;
    text-align: right;
    font-size: 0.625rem; /* Defaults to 10px */
    color: $modesttext;
  }

  &::after {
    content: '';
    position: absolute;
    display: block;
    z-index: 6;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 2px;
    background-color: transparent;
    transition: all 0.5s ease;
  }
}

/* pointer type */
.jqtl-event-node.jqtl-event-type-pointer { 
  padding: 0;
  border-radius: 50%;
  border: solid 3px $line;
  background-image: none;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  transition: all 0.1s linear;

  &.active {
    border-color: $activeline !important;
  }

  &:hover {
    border-color: $activeline;
  }

  &::after {
    transition: all .1s linear;
  }

  &> .jqtl-event-label {
    display: none;
  }

  &> .jqtl-event-thumbnail {
    display: none;
  }
}

/* ----------------------------------------------------------------------------
 * Sidebar index style
 * ----------------------------------------------------------------------------
 */
.jqtl-side-index {
  position: relative;
  left: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  width: max-content;
  outline: solid 1px $offline;
  z-index: 25;

  &> [class^="jqtl-side-index-"] { 
    padding: 0;
    width: 100%;
    font-size: 14px;
    vertical-align: middle;
    border-bottom: dotted 1px $offline;
    background-color: $background;
    white-space: nowrap;
  }

  .jqtl-side-index-item {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;

    &::before,
    &::after {
      display: inline-block;
      content: '';
    }

    &:nth-child(odd) {
      background-color: $striped1;
    }

    &:first-child {
      border-top: solid 1px $offline;
    }

    img {
      position: relative;
      display: inline-block;
      margin-right: 0.5rem;
      height: calc(100% - 6px);
      width: auto;
      text-align: left;
      vertical-align: middle;
    }
  }

  .jqtl-side-index-margin {
    outline: solid 1px $offline;

    &:first-child {
      border-bottom: solid 1px $offline;
    }

    &:last-child {
      border-top: solid 1px $offline;
      border-bottom: 0;
    }
  }
}

.jqtl-sticky-left {
  position: -webkit-sticky;
  position: sticky;
}

.jqtl-overlay {
  background-color: rgba($background, 0.65) !important;

  &:nth-child(odd) {
    background-color: rgba($striped1, 0.45) !important;
  }
}

/* ----------------------------------------------------------------------------
 * Event Viewer
 * ----------------------------------------------------------------------------
 */
.jqtl-event-view,
.timeline-event-view {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  align-content: space-between;
  transition: all 0.5s ease;
}

.jqtl-event-image-wrapper {
  flex-order: 0;
  flex-grow: 1;
  align-self: center;
}

.jqtl-event-image {
  width: 100%;
  height: auto;
}

.jqtl-event-title {
  flex-order: 0;
  flex-grow: 1;
  align-self: flex-start;
  padding: 1rem;

  &> .event-content {
    color: $offtext;
  }
}

.jqtl-event-content {
  flex-order: 0;
  flex-grow: 1;
  align-self: stretch;
  padding: 1rem;
}

.jqtl-event-meta {
  flex-order: 0;
  flex-grow: 1;
  align-self: flex-end;
  padding: 0.5rem 1rem;
}

/* ----------------------------------------------------------------------------
 * Present Time Marker
 * ----------------------------------------------------------------------------
 */
.jqtl-present-time {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  border-left: dotted 1px $marker;
  z-index: 21;

  &::before,
  &::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    width: 5px;
    height: 5px;
    background-color: $marker;
    z-index: 22;
  }

  &::before {
    top: calc(5px / -2);
    left: -3px;
  }

  &::after {
    bottom: calc(5px / -2);
    left: -3px;
  }
}

/* ----------------------------------------------------------------------------
 * Footer style
 * ----------------------------------------------------------------------------
 */
.jqtl-footer {
  margin: 15px auto;
  padding: 0;
  width: 100%;
}

.jqtl-footer-content {
  clear: both;
  text-align: center;
}

/* ----------------------------------------------------------------------------
 * Builtin Loader style
 * ----------------------------------------------------------------------------
 */
.jqtl-loader {
  position: absolute;
  display: block;
  visibility: hidden;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: auto;
  opacity: 0;
  z-index: 30;
  transition: all 0.3s;

  &[data-state^=show] {
    visibility: visible;
    opacity: 1;
  }

  &[data-state^=hid] {
    visibility: hidden;
    opacity: 0;
  }
}

/* Wave Type */
.jqtl-loading {
  position: relative;
  top: 50%;
  left: 50%;
  margin: auto;

  span {
    display: block;
    bottom: 0px;
    width: 9px;
    height: 5px;
    background: rgba($text, 0.15);
    position: absolute;
    animation: loader 1.5s infinite ease-in-out;

    &:nth-child(2) {
      left: 11px;
      animation-delay: 0.2s;
    }

    &:nth-child(3) {
      left: 22px;
      animation-delay: 0.4s;
    }

    &:nth-child(4) {
      left: 33px;
      animation-delay: 0.6s;
    }

    &:nth-child(5) {
      left: 44px;
      animation-delay: 0.8s;
    }
  }
}

@keyframes loader {
  0% {
    height: 5px;
    transform: translateY(0px);
    background: rgba($text, 0.15);
  }
  25% {
    height: 30px;
    transform: translateY(15px);
    background: rgba($text, 0.3);
  }
  50% {
    height: 5px;
    transform: translateY(0px);
    background: rgba($text, 0.15);
  }
  100% {
    height: 5px;
    transform: translateY(0px);
    background: rgba($text, 0.15);
  }
}

/* ----------------------------------------------------------------------------
 * Others
 * ----------------------------------------------------------------------------
 */
#jqtl-str-ruler {
  position: absolute;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
  white-space: nowrap;
}

.jqtl-icon {
  position: relative;
  display: inline-block;
  margin-top: auto;
  margin-bottom: auto;
  min-width: 1em;
  min-height: 1em;
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
  text-align: center;
  background-image: url("data:image/svg+xml;utf-8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' width='538.583px' height='538.583px' viewBox='0 0 538.583 538.583'><path fill='%23184EE8' d='M270.291,78.341c16.82,0,30.45,13.63,30.45,30.45s-13.63,30.45-30.45,30.45s-30.45-13.63-30.45-30.45S253.471,78.341,270.291,78.341z M270.291,398.341c16.82,0,30.45,13.63,30.45,30.45s-13.63,30.45-30.45,30.45s-30.45-13.63-30.45-30.45S253.471,398.341,270.291,398.341z M139.291,237.341c16.82,0,30.45,13.63,30.45,30.45s-13.63,30.45-30.45,30.45s-30.45-13.63-30.45-30.45S122.471,237.341,139.291,237.341z M405.291,237.341c16.82,0,30.45,13.63,30.45,30.45s-13.63,30.45-30.45,30.45s-30.45-13.63-30.45-30.45S388.471,237.341,405.291,237.341z M19.291,188.792c0,31.49,23.63,64.05,56,79.96c0.52,34.9,28.97,63.04,64,63.04c31.6,0,57.85-22.89,63.06-53h139.88c5.21,30.11,31.46,53,63.06,53c26.4,0,49.06-15.98,58.85-38.8c16.85,12.94,27.15,31.24,27.15,51.52c0,21.67-11.45,41.08-30.14,54.1c-13.46,6.91-29.61,10.9-47.32,10.9h-82.82c-8.48-25.41-32.46-43.72-60.72-43.72c-27.52,0-50.99,17.37-60.03,41.75h-81.64v-43.75l-84.33,59.5l84.33,59.5v-43.75h78.33c4.49,30.96,31.13,54.75,63.34,54.75c32.39,0,59.16-24.06,63.41-55.28h87.13c52.17,0,99.46-43.82,99.46-88v-12c0-29.96-21.4-60.9-51.36-77.53c-3.4-32.15-30.59-57.19-63.64-57.19c-27.62,0-51.15,17.49-60.12,42h-145.76c-8.97-24.51-32.5-42-60.12-42c-24.97,0-46.6,14.3-57.15,35.15c-20.78-12.98-33.85-33.31-33.85-56.15c0-21.67,11.45-41.08,30.14-54.1c13.46-6.91,29.61-10.9,47.32-10.9h81.03c3.94,31.57,30.87,56,63.51,56c30.8,0,56.52-21.76,62.63-50.75h79.04v43.75l84.33-59.5l-84.33-59.5v43.75h-80.31c-7.86-26.46-32.35-45.75-61.36-45.75c-27.99,0-51.78,17.97-60.48,43h-91.06c-52.17,0-99.46,43.82-99.46,88V188.792z'/></svg>");
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
}
